package org.jeecg.modules.wms.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 创建入库单VO
 */
@Data
@ApiModel(value = "InboundCreateVO", description = "创建入库单VO")
public class InboundCreateVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "销售订单ID", required = true)
    @NotBlank(message = "销售订单ID不能为空")
    private String orderId;

    @ApiModelProperty(value = "销售订单号", required = true)
    @NotBlank(message = "销售订单号不能为空")
    private String orderNo;

    @ApiModelProperty(value = "生产计划ID")
    private String productionPlanId;

    @ApiModelProperty(value = "生产任务ID")
    private String productionTaskId;

    @ApiModelProperty(value = "入库日期", required = true)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "入库日期不能为空")
    private Date inboundDate;

    @ApiModelProperty(value = "仓库ID", required = true)
    @NotBlank(message = "仓库ID不能为空")
    private String warehouseId;

    @ApiModelProperty(value = "操作员姓名")
    private String operatorName;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "入库明细列表", required = true)
    @NotNull(message = "入库明细不能为空")
    private List<InboundDetailCreateVO> detailList;
}
